by Russell Towle, June 1997. email: rustybel@foothill.net
Polar zonohedra are convex rhombic polyhedra determined by n vectors of equal magnitude. These vectors are identical to those connecting the apex to the base of a right regular n-gonal pyramid. Like such pyramids, polar zonohedra may be short and squashed, or tall and skinny. A polar zonohedron is symmetrical by a rotation of 360/n degrees around its symmetry axis, here coincident with the z axis. This scene calls two "include" files and creates an ordinary polar zonohedron, with rhombic faces, but with spheres at each vertex and cylinders at each edge. Switches are also provided to create only one or the other.
There are ten user-defined parameters in the procedure below:
1. N, the number of vectors; N>=3. Default: N=10.
2. PITCH, the angle between the vectors and the xy plane; 0<=PITCH<=90 degrees. Default: PITCH=35.2643.
3. A, the edge length. Default: D=tan(pi/N).
4. B, the spheres' radius. Default: A/5.
5. C, the cylinders' radius. Default: A/10
6. T1, texture for the spheres. Default: texture{Gold_Metal}.
7. T2, texture for the cylinders. Default: texture{T_Silver_1A}.
8. T3, texture for the rhombic faces. Default: texture{Copper_Metal}.
9. CYLLOHEDRON switch. Default: 1 (on).
10. POLAR_ZONOHEDRON switch. Default: 1 (on).
A polar zonohedron is the most spherical, and has the greatest volume for any given edge length, when PITCH = 35.2643+ degrees. At that PITCH, polar zonohedra are isometric, orthogonal, solid shadows of N-cubes. The default scaling forces approximate unit equatorial radius; however, because the polar diameter varies according to PITCH, these forms may still stretch out of camera view when PITCH is high.
They are centered upon the z axis, with the sphere at the "south" pole just kissing the z=0 plane, whatever the PITCH. The camera and light statements will be found below the CYLLOHEDRON routine, since they use variables defined in that routine.*/